<?php
namespace app\index\controller;

use app\index\model\Archives;
use app\index\model\ArchivesCategory;
use app\index\model\Arc_extend_info;
use app\index\model\Storeroom;
use app\index\model\Tag;
use app\index\model\TagArchivesRelation;
use app\index\model\TagGroup;
use app\index\model\User;
use think\Controller;
use think\Request;

class Add extends Common {
	protected $request;
	protected $ac_model;
	protected $a_model;
	protected $acf_model;
	protected $tag_model;
	protected $tag_group_model;
	protected $tag_archives_relation_model;
	protected $storage_model;

	public function __construct(Request $request = null) {
		parent::__construct($request);
		$this->request = $request;
		$this->ac_model = new ArchivesCategory();
		$this->a_model = new Archives();
		$this->tag_model = new Tag();
		$this->tag_archives_relation_model = new TagArchivesRelation();
		$this->tag_group_model = new TagGroup();
		$this->storage_model = new Storeroom();
		$this->aei_model = new Arc_extend_info();
		$this->user_model = new User();
	}

	public function index() {
		// var_dump('12');die;
		return view('index@Add/index');
	}

	public function addcode() {
		if ($_SESSION['think']['username'][0]['user_name'] == 'admin') {
			return view('index@Add/addcode');
		} else {
			return view('index@index/index');
		}
	}
}